package com.beiben.experiment.equipment.domain;

import java.util.Date;
import java.util.List;

import com.beiben.experiment.repair.domain.Repair;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 试验设备\计量设备信息对象 experiment_equipment
 * 
 * @author 熊国强
 * @date 2020-11-11
 */
public class Equipment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long equipmentId;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String name;

    /** 规格型号 */
    @Excel(name = "规格型号")
    private String model;

    /** 功能描述 */
    @Excel(name = "功能描述")
    private String functionName;

    /** 编号 */
    @Excel(name = "编号")
    private String code;

    /** 使用状态（0：完好、1：维修、2：禁用） */
    @Excel(name = "使用状态", readConverterExp = "0=完好,1=维修,2=禁用")
    private Integer useState;

    /** 购置年份 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "购置年份", width = 30, dateFormat = "yyyy-MM-dd")
    private Date buyYear;

    /** 检测时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "检测时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date checkTime;

    /** 明细 */
    @Excel(name = "明细")
    private String detail;

    /*未完成维修明细*/
    private List<Repair> repairs;

    public void setEquipmentId(Long equipmentId) 
    {
        this.equipmentId = equipmentId;
    }

    public Long getEquipmentId() 
    {
        return equipmentId;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setModel(String model) 
    {
        this.model = model;
    }

    public String getModel() 
    {
        return model;
    }
    public void setFunctionName(String functionName) 
    {
        this.functionName = functionName;
    }

    public String getFunctionName() 
    {
        return functionName;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setUseState(Integer useState) 
    {
        this.useState = useState;
    }

    public Integer getUseState() 
    {
        return useState;
    }
    public void setBuyYear(Date buyYear) 
    {
        this.buyYear = buyYear;
    }

    public Date getBuyYear() 
    {
        return buyYear;
    }
    public void setCheckTime(Date checkTime) 
    {
        this.checkTime = checkTime;
    }

    public Date getCheckTime() 
    {
        return checkTime;
    }
    public void setDetail(String detail) 
    {
        this.detail = detail;
    }

    public String getDetail() 
    {
        return detail;
    }


    public List<Repair> getRepairs() {
        return repairs;
    }

    public void setRepairs(List<Repair> repairs) {
        this.repairs = repairs;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("equipmentId", getEquipmentId())
            .append("name", getName())
            .append("model", getModel())
            .append("functionName", getFunctionName())
            .append("code", getCode())
            .append("useState", getUseState())
            .append("buyYear", getBuyYear())
            .append("checkTime", getCheckTime())
            .append("detail", getDetail())
            .toString();
    }
}
